#include "files/directory.h"
#include "functional/functional.h"
#include "scanner/movie_processor.h"
#include "scanner/movie_scanner.h"
#include "settings/settings.h"

#include <algorithm>

namespace Tvimeg
{
	void MovieScanner::ScanMovieFolders(void) const
	{
		// create the processor object
		const MovieProcessor processor;

		// scan the movie folders
		std::for_each(Settings::GetInstance().MoviesBegin(), Settings::GetInstance().MoviesEnd(), Bind(*this, &MovieScanner::Scan, processor));
	}

	void MovieScanner::Scan(const Directory& directory, const MovieProcessor& processor) const
	{
		BaseScanner::Scan(directory, processor);
	}
}
